//
//  ControlCategory.h
//  MoneyIndividual
//
//  Created by Le Anh Tai on 12/28/13.
//  Copyright (c) 2013 Le Anh Tai. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface UILabel(Extension)

+ (UILabel*)newTitleLabel;
+ (UILabel*)newDescriptionLabel;
+ (UILabel*)newNormalLabel;

- (int)fontHeight;
- (float)widthString;
@end

@interface UIButton(Extension)

+ (UIButton*)buttonWithTitle:(NSString*)title target:(id)target selector:(SEL)sel;
+ (UIButton*)buttonWithImage:(UIImage*)image target:(id)target selector:(SEL)sel;

@end

@interface UIImage(Extension)

+ (UIImage *)imageNamed:(NSString*)name color:(UIColor*)color;
+ (UIImage *)imageFromColor:(UIColor *)color withRect:(CGRect)imageRect;
+ (UIImage *)imageFromColor:(UIColor *)color;
@end

@interface UIView(Extension)

+ (UIView*)newLineView;

@end

@interface UITextField(Extension)

- (float)floatValue;
//- (void)setInputViewEx:(UIView *)inputViewEx;
- (void)becomeFirstResponderAfterDelay;
@end

@interface UINavigationController(Extension)

+ (UINavigationController*)newNavigationWithRoot:(UIViewController*)viewController;

@end

@interface NSString(Extension)

+ (NSString*)stringWithInt:(NSInteger)intValue;

- (RepeatType)getRepeatTypeByRepeatTypeString:(NSString*)type;

@end

@interface NSManagedObject(Extension)

- (BOOL)containKey:(NSString*)key;
- (id)valueForKeyEx:(NSString *)key;
- (void)setValueEx:(id)value forKey:(NSString *)key;

- (NSManagedObject*)getAccountOfTransactionObject;
- (void)setAccountForTransactionObject:(NSManagedObject*)account;

- (NSString*)getRepeatTypeString;
@end

@interface UILocalNotification(Extension)

+ (void)scheduleNotificationWithAlertBody:(NSString*)body
                                 fireDate:(NSDate*)fireDate
                              badgeNumber:(NSInteger)badgeNumber
             isCancelAllLocalNotification:(BOOL)cancel;
@end
